using DA.AnimGraph;
using UnityEngine.UIElements;

namespace DA.AnimGraph.Editor {

    internal class InspectorField_Float : InspectorField<RefField<float>> {

        FloatField floatField;

        protected override void BuildUI() {
            floatField = new FloatField(labelText);
            floatField.value = source.value;
            floatField.RegisterValueChangedCallback(evt => {
                source.value = evt.newValue;
                inspectorChangeCallback?.Invoke();
            });
        }

        protected override void DrawUI() {
            Add(floatField);
        }

    }

}
